
const path = require('path');
function resolve (dir) {
    return path.join(__dirname, dir)
}
module.exports = {
  lintOnSave: true,
  chainWebpack: (config)=>{
      config.resolve.alias
          .set('@$', resolve('src'))
          .set('assets',resolve('src/assets'))
          .set('components',resolve('src/components'))
          .set('layout',resolve('src/layout'))
          .set('base',resolve('src/base'))
          .set('styles',resolve('src/assets/styles'))
  },
  devServer: {
    port: 8090,
    proxy: {
      '/api': {
        target: "http://localhost:8090/",
        pathRewrite: {
          '^/api': '/static/mock'
        }
      }
    }
  }

}
